home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: netcom.com!gibson
- From: gibson@netcom.com (Bob Gibson)
- Subject: Re: Help!! I'm a stuck newbie - input problem
- Message-ID: <gibsonDLy1zo.JA0@netcom.com>
- Organization: A number of persons or groups united for some purpose
- X-Newsreader: TIN [version 1.2 PL1]
- References: <4eh3vl$g8i@atlas.uniserve.com>
- Date: Mon, 29 Jan 1996 13:11:48 GMT
- Sender: gibson@netcom21.netcom.com
-
- Chris (nowher@anyplace.com) wrote:
- ...
- : I need to input a string with a max length of 15 chars.
-
- One of the member functions of cin is getline, of where there
- are multiple signitures provided. One of which is:
-
- istream& getline( char * ptr, int len, char delim = '\n' );
-
- This means that if you provide a length as the second parameter,
- getline will make sure that no more than len charas are stored.
-
- Bob
- --
- O.J. Verdict - The best innocence money can buy
-
- Bob Gibson -- gibson@netcom.com
-